<?php
require "lib/adaptee.php";
require "lib/class_adapter.php";
require "lib/object_adapter.php";

header('Content-Type: text/plain');

/** @var TargetInterface[] $list */
$list=[
    new TargetClass,
    new ClassAdapter,
    new ObjectAdapter,
];

foreach($list as $instance){
    if($instance instanceof TargetInterface){
        $instance->greet();
    }
    else{
        echo "failed";exit;
    }
}
